import Http from 'utils/request'

const context = process.env.VUE_APP_CONSOLE_PATH

const API = {
  memberExamineDList: '/customer/memberExamineDList', //查询待审核列表
  memberExamine: '/customer/memberExamine', // 实名认证
  memberExamineAudit: '/customer/memberExamineAudit', // 会员审核
  memberList: '/customer/memberList', // 会员列表
  memberCardList: '/customer/memberCardList', //会员账号信息
  memberCardFrozenThaw: '/customer/memberCardFrozenThaw', //会员账号解冻和冻结
  cancelOrderList: '/customer/cancelOrderList', //会员取消订单列表
  resetMemberCancelOrder: '/customer/resetMemberCancelOrder', // 重置取消次数

  customerRefundLogList: '/refund/customerRefundLogList', // 客服退款列表
  auditCustomerRefund: '/refund/auditCustomerRefund', // 客服审核
  cancelRefund: '/refund/cancelRefund', //客服取消
  remitCustomerRefund: '/refund/remitCustomerRefund', // 财务批量打款

  companyList: '/company/list', // 企业列表
  companyAdd: '/company/insert', // 新增企业
  companyUpdate: '/company/update' // 更新企业
}

/**
 * 通用接口请求方法
 * @param {*} param
 */
export const fetch = (url, param = {}, opt = {}) => Http.fetch(context + API[url], param, opt)
